﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:tb="clr-namespace:TreeBuilder">
    <Image x:Key="FontImage" Source="pack://application:,,,/Icons/font_32.png"/>
    <Image x:Key="DeleteImage" Source="pack://application:,,,/Icons/delete.png"/>
    <SolidColorBrush x:Key="LineBrush" Color="Black"/>
    <SolidColorBrush x:Key="RectangleBrush" Color="White"/>
    <Pen x:Key="LinePen" Brush="{StaticResource LineBrush}" Thickness="10"/>
    <Pen x:Key="RectanglePen" Brush="{StaticResource RectangleBrush}" Thickness="0"/>
    <Image x:Key="LineImage">
        <Image.Source>
            <DrawingImage>
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <GeometryDrawing Pen="{StaticResource RectanglePen}" Brush="{StaticResource RectangleBrush}">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,100,100"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                        <GeometryDrawing Pen="{StaticResource LinePen}" Brush="{StaticResource LineBrush}">
                            <GeometryDrawing.Geometry>
                                <LineGeometry StartPoint="0,50" EndPoint="100,50"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>
    <Image x:Key="ArrowImage">
        <Image.Source>
            <DrawingImage>
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <GeometryDrawing Pen="{StaticResource RectanglePen}" Brush="{StaticResource RectangleBrush}">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,100,100"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                        <GeometryDrawing Pen="{StaticResource LinePen}" Brush="{StaticResource LineBrush}">
                            <GeometryDrawing.Geometry>
                                <GeometryGroup>
                                    <LineGeometry StartPoint="0,50" EndPoint="100,50"/>
                                    <PathGeometry>
                                        <PathFigure StartPoint="100,50" IsClosed="True">
                                            <LineSegment Point="50,20"/>
                                            <LineSegment Point="70,50"/>
                                            <LineSegment Point="50,80"/>
                                        </PathFigure>
                                    </PathGeometry>
                                </GeometryGroup>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>
    <Image x:Key="TriangleImage">
        <Image.Source>
            <DrawingImage>
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <GeometryDrawing Pen="{StaticResource RectanglePen}" Brush="{StaticResource RectangleBrush}">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,100,100"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                        <GeometryDrawing Pen="{StaticResource LinePen}" Brush="{StaticResource LineBrush}">
                            <GeometryDrawing.Geometry>
                                <GeometryGroup>
                                    <LineGeometry StartPoint="50,0" EndPoint="0,100"/>
                                    <LineGeometry StartPoint="0,100" EndPoint="100,100"/>
                                    <LineGeometry StartPoint="100,100" EndPoint="50,0"/>
                                </GeometryGroup>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>
    <Style x:Key="ButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="White"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="LightSkyBlue"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="NodeBoxStyle" TargetType="{x:Type tb:TreeNodeBox}">
        <Setter Property="Background" Value="LightSkyBlue"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Style.Triggers>
            <Trigger Property="IsBeingLinked" Value="false">
                <Setter Property="Background" Value="White"/>
            </Trigger>
            <Trigger Property="IsBeingPrinted" Value="false">
                <Setter Property="BorderThickness" Value="1"/>
            </Trigger>
            <Trigger Property="IsBeingPrinted" Value="true">
                <Setter Property="Background" Value="White"/>
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>